home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / c_news / 09 / hgraph2 / h_graph2.h < prev    next >
Text File  |  1988-07-14  |  3KB  |  67 lines

  1.      /*   DEFINES USED IN HERCULES FUNCTIONS                       */
  2.  
  3. #define H_MEMLOC 0xB0000000 /* Hercules memory location            */
  4.      /* the formula to convert a pixel position to a Hercules
  5.         memory byte location                                       */
  6. #define H_FORMULA (x1>>3)+((y1>>2)*90)+((y1 & 3)*8192)+h_apage*0x8000
  7. #define MODEPORT 0x3B8     /* the Hercules ports                   */
  8. #define ADDRPORT 0x3B4
  9. #define DATAPORT 0x3B5
  10. #define H_PSET   0         /*  several put modes                   */
  11. #define H_AND    1
  12. #define H_OR     2
  13. #define H_XOR    3
  14.  
  15.    /*   EXTERNAL VARIABLES USED IN HERCULES FUNCTIONS              */
  16.  
  17. int    h_xpos=0;           /* the current graphics cursor position */
  18. int    h_ypos=0;
  19. int    h_xmin=0;           /* the limits of the current window     */
  20. int    h_xmax=719;
  21. int    h_ymin=0;
  22. int    h_ymax=347;
  23. int    h_vpage=0;          /* the current visible page             */
  24. int    h_apage=0;          /* the current active page              */
  25. int    h_pmode=H_PSET;     /* the current put mode                 */
  26. int    h_color=1;          /* the current drawing color            */
  27. int    h_vmode=7;          /* the current video mode               */
  28. int    h_start=0;          /* a backstop for text                  */
  29. char far *h_p;             /* a pointer to to Hercules memory      */
  30.  
  31.       /*      SOME FILL PATTERNS                                   */
  32.  
  33. char lgrey[8]={170,85,170,85,170,85,170,85};
  34. char dgrey[8]={204,51,204,51,204,51,204,51};
  35. char fore[8]={255,255,255,255,255,255,255,255};
  36. char back[8]={0,0,0,0,0,0,0,0};
  37. char nlines[8]={0,255,0,255,0,255,0,255};
  38. char nstripes[8]={34,34,34,34,34,34,34,34};
  39. char nrhatch[8]={17,34,68,136,17,34,68,136};
  40. char nlhatch[8]={136,68,34,17,136,68,34,17};
  41. char wlines[8]={0,0,0,255,0,0,0,255};
  42. char wstripes[8]={128,128,128,128,128,128,128,128};
  43. char wrhatch[8]={1,2,4,8,16,32,64,128};
  44. char wlhatch[8]={128,64,32,16,8,4,2,1};
  45.  
  46.       /*     HERCULES PROTOTYPES                                   */
  47.  
  48. int     h_isherc(void);
  49. int     h_init(int mode);
  50. int     h_setvpage(int page);
  51. int     h_moveto(int x1,int y1);
  52. int     h_setpmode(int newpmode);
  53. int     h_loadfont(char *fname,char *alphaptr);
  54. void    h_onoff(int on);
  55. void    h_boxfill(int x2,int y2,char *tile);
  56. void    h_box(int x2,int y2,char *tile);
  57. void    h_memor(char far *memptr,int fill,int count);
  58. void    h_mempse(char far *memptr,int fill,int count);
  59. void    h_memand(char far *memptr,int fill,int count);
  60. void    h_memxor(char far *memptr,int fill,int count);
  61. void    h_clrw(char *tile);
  62. void    h_explode(char *tile);
  63. void    h_patterns(void);
  64. void    h_drawc(char letter,char *alphabet);
  65. void    h_draws(char *string,char *alf_ptr);
  66.  
  67.